package com.hongkzh.www.look.enterprise.userinfo.view.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.hongkzh.www.view.fragment.BaseFragment;

import java.util.ArrayList;

/**
 * Created by as on 2018/3/29.
 */

/**
 * 用户简介中viewpager的adapter
 */
public class InstitutionPagerAdapter extends FragmentPagerAdapter {

    private ArrayList<BaseFragment> fragmentsList;

    public InstitutionPagerAdapter(FragmentManager fm, ArrayList<BaseFragment> fragments) {
        super(fm);
        this.fragmentsList = fragments;
    }

    public ArrayList<BaseFragment> getList(){
        return  fragmentsList;
    }

    @Override
    public BaseFragment getItem(int position) {
        return fragmentsList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentsList.size();
    }
}
